#cs ----------------------------------------------------------------------------
	
	$Author: bjoern.kaiser $
	$LastChangedDate: 2008-04-16 09:06:15 +0000 (Wed, 16 Apr 2008) $
	
	Script Function:
	Easy access to UniXP.ini values
	
#ce ----------------------------------------------------------------------------

#include-once
;~ #include ".\globals.au3"

Func _inihandler_value($strSection, $strKey)
	Local $strReturn
	
	Select
		Case $strSection = "CONFIG"
			For $i = 1 To $gArrConfig[0][0]
				If $gArrConfig[$i][0] = $strKey Then $strReturn = $gArrConfig[$i][1]
			Next
		Case $strSection = "IMAGE"
			For $i = 1 To $gArrImage[0][0]
				If $gArrImage[$i][0] = $strKey Then $strReturn = $gArrImage[$i][1]
			Next
		Case $strSection = "OS"
			For $i = 1 To $gArrOs[0][0]
				If $gArrOs[$i][0] = $strKey Then $strReturn = $gArrOs[$i][1]
			Next
		Case $strSection = "DISKPART"
			For $i = 1 To $gArrDp[0][0]	
				If $gArrDp[$i][0] = $strKey Then $strReturn = $gArrDp[$i][1]
			Next
		Case Else
			$strReturn = ""
	EndSelect
	
	Return $strReturn
	
EndFunc   ;==>_inihandler_value

Func _ini($strSection, $strKey)
	Local $strValue = _inihandler_value($strSection, $strKey)
	Return $strValue
EndFunc   ;==>_ini